From: kaf24@firebug.cl.cam.ac.uk Date: Tue, 25 Apr 2006 17:22:11 +0000 (+0100) Subject: Need a little more serialisation in pciback_do_op(). X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16117^2~2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=b11a028b0493040a0ea0af22bc86ec39cfdae04a;p=xen.git Need a little more serialisation in pciback_do_op(). Signed-off-by: Keir Fraser --- diff --git a/linux-2.6-xen-sparse/drivers/xen/pciback/pciback_ops.c b/linux-2.6-xen-sparse/drivers/xen/pciback/pciback_ops.c index 4dc35d581c..96715899cb 100644 --- a/linux-2.6-xen-sparse/drivers/xen/pciback/pciback_ops.c +++ b/linux-2.6-xen-sparse/drivers/xen/pciback/pciback_ops.c @@ -77,12 +77,13 @@ void pciback_do_op(void *data) clear_bit(_XEN_PCIF_active, (unsigned long *)&pdev->sh_info->flags); notify_remote_via_irq(pdev->evtchn_irq); - /* Mark that we're done */ - wmb(); + /* Mark that we're done. */ + smp_mb__before_clear_bit(); /* /after/ clearing PCIF_active */ clear_bit(_PDEVF_op_active, &pdev->flags); + smp_mb__after_clear_bit(); /* /before/ final check for work */ - /* Check to see if the driver domain tried to start another request - * in between clearing _XEN_PCIF_active and clearing _PDEVF_op_active */ + /* Check to see if the driver domain tried to start another request in + * between clearing _XEN_PCIF_active and clearing _PDEVF_op_active. */ test_and_schedule_op(pdev); }